<template>
  <div>
    <br />
    <a-card class="card-content">
      <a-tabs default-active-key="ReceiptTable" @change="handleChange">
        <a-tab-pane :key="item.value" :tab="item.label" v-for="item in Option">
          <component :is="tabComponent"></component>
        </a-tab-pane>
      </a-tabs>
    </a-card>
  </div>
</template>

<script>
import IssueTable from "./components/IssueTable.vue";
import ReceiptTable from "./components/ReceiptTable.vue";
export default {
  components: { IssueTable, ReceiptTable },
  data() {
    return {
      Option: [
        { label: "入库记录", value: "ReceiptTable" },
        { label: "出库记录", value: "IssueTable" },
      ],
      tabComponent: "ReceiptTable",
    };
  },
  methods: {
    handleChange(value) {
      this.tabComponent = value;
    },
  },
};
</script>
